//
//  ZooAuth.m
//  ZooNgonDoiOS
//
//  Created by Anh Jun Linh Tinh on 6/20/12.
//  Copyright (c) 2012 Personal. All rights reserved.
//

#import "ZooAuth.h"

@implementation ZooAuth

-(id)initWithTarget:(id)target selector:(SEL)selector {
    self = [super init];
    if(self){
        _target = target;
        _selector = selector;
        
    }
    return self;
}



-(void)objectLoader:(RKObjectLoader *)objectLoader didLoadObject:(id)object{
    if(![objectLoader.response isUnauthorized]){
        ZooAuthBean *authBean = object;
        [_target performSelector:_selector withObject:authBean.token withObject:authBean.token_secret];
    }else{
        
    }
}
 
-(void)objectLoader:(RKObjectLoader *)objectLoader didFailWithError:(NSError *)error{
    
}
@end
